{{:ModuleInclude('public/header')}}

<!-- right content start  -->
<div class="content-right">
	<div class="content">
        <!-- form start -->
        <form class="am-form form-validation am-form-popup-sticky" action="{{:MyUrl('admin/config/save', ['view_type'=>$view_type])}}" method="POST" request-type="ajax-view" request-value="{{:MyUrl('admin/config/index')}}">

            <!--                    [-->
            <!--                        'name' => MyLang('map_title'),-->
            <!--                        'key'  => 'map',-->
            <!--                    ],-->
            {{:ModuleInclude('public/nav_switch_btn', [
                'nav_data' => [
                    [
                        'name' => MyLang('base_config_title'),
                        'key'  => 'base-config-title',
                    ],
                    [
                        'name' => MyLang('config.admin_login_title'),
                        'key'  => 'admin-login',
                    ],
                    [
                        'name' => MyLang('goods_title'),
                        'key'  => 'goods',
                    ],
                    [
                        'name' => MyLang('extend_title'),
                        'key'  => 'extend',
                    ],
                    [
                        'name' => MyLang('safety_title'),
                        'key'  => 'safety',
                    ]
                ]
            ])}}
            <div class="nav-content">
                <!-- 基础配置 -->
                <div class="item am-active" data-key="base-config-title">
                    <div class="am-form-group">
                        <label class="am-block">{{$data.admin_logo.name}}<span class="am-form-group-label-tips">{{$data.admin_logo.describe}}</span></label>
                        <div class="am-form-file-upload-container plug-file-upload-view-width-auto">
                            <ul class="plug-file-upload-view admin_logo-images-view" data-form-name="admin_logo" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                <li class="plug-file-upload-submit" data-view-tag="ul.admin_logo-images-view">
                                    {{if empty($data['admin_logo']['value'])}}
                                        <i class="iconfont icon-upload-add"></i>
                                    {{else /}}
                                        <input type="text" name="admin_logo" value="{{$data.admin_logo.value}}" />
                                        <img src="{{:AttachmentPathViewHandle($data.admin_logo.value)}}" />
                                        <i class="iconfont icon-close"></i>
                                        <i class="iconfont icon-eye"></i>
                                    {{/if}}
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.admin_excel_charset.name}}<span class="am-form-group-label-tips">{{$data.admin_excel_charset.describe}}</span></label>
                        <select name="{{$data.admin_excel_charset.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.admin_excel_charset.error_tips}}" required>
                            {{foreach :MyConst('common_excel_charset_list') as $v}}
                                <option value="{{$v.id}}" {{if isset($data['admin_excel_charset']['value']) and $data['admin_excel_charset']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
                            {{/foreach}}
                        </select>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_excel_export_type.name}}<span class="am-form-group-label-tips">{{$data.common_excel_export_type.describe}}</span></label>
                        <select name="{{$data.common_excel_export_type.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_excel_export_type.error_tips}}" required>
                            {{foreach :MyConst('common_excel_export_type_list') as $v}}
                                <option value="{{$v.id}}" {{if isset($data['common_excel_export_type']['value']) and $data['common_excel_export_type']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
                            {{/foreach}}
                        </select>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_page_size.name}}<span class="am-form-group-label-tips">{{$data.common_page_size.describe}}</span></label>
                        <input type="number" name="{{$data.common_page_size.only_tag}}" placeholder="{{$data.common_page_size.name}}" pattern="{{:MyConst('common_regex_page_number')}}" data-validation-message="{{$data.common_page_size.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_page_size.value}}"{{/if}} required />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.admin_notice.name}}<span class="am-form-group-label-tips">{{$data.admin_notice.describe}}</span></label>
                        <textarea rows="4" name="{{$data.admin_notice.only_tag}}" class="am-radius" placeholder="{{$data.admin_notice.name}}" data-validation-message="{{$data.admin_notice.error_tips}}">{{if !empty($data)}}{{$data.admin_notice.value}}{{/if}}</textarea>
                    </div>
                </div>

                <!-- 后台登录 -->
                <div class="item" data-key="admin-login">
                    <div class="am-form-group">
                        <label class="am-block">{{$data.admin_login_logo.name}}<span class="am-form-group-label-tips">{{$data.admin_login_logo.describe}}</span></label>
                        <div class="am-form-file-upload-container plug-file-upload-view-width-auto">
                            <ul class="plug-file-upload-view admin_login_logo-images-view" data-form-name="admin_login_logo" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                <li class="plug-file-upload-submit" data-view-tag="ul.admin_login_logo-images-view">
                                    {{if empty($data['admin_login_logo']['value'])}}
                                        <i class="iconfont icon-upload-add"></i>
                                    {{else /}}
                                        <input type="text" name="admin_login_logo" value="{{$data.admin_login_logo.value}}" />
                                        <img src="{{:AttachmentPathViewHandle($data.admin_login_logo.value)}}" />
                                        <i class="iconfont icon-close"></i>
                                        <i class="iconfont icon-eye"></i>
                                    {{/if}}
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label class="am-block">{{$data.admin_login_ad_images.name}}<span class="am-form-group-label-tips">{{$data.admin_login_ad_images.describe}}</span></label>
                        <div class="am-form-file-upload-container plug-file-upload-view-width-auto">
                            <ul class="plug-file-upload-view admin_login_ad_images-images-view" data-form-name="admin_login_ad_images" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                                <li class="plug-file-upload-submit" data-view-tag="ul.admin_login_ad_images-images-view">
                                    {{if empty($data['admin_login_ad_images']['value'])}}
                                        <i class="iconfont icon-upload-add"></i>
                                    {{else /}}
                                        <input type="text" name="admin_login_ad_images" value="{{$data.admin_login_ad_images.value}}" />
                                        <img src="{{:AttachmentPathViewHandle($data.admin_login_ad_images.value)}}" />
                                        <i class="iconfont icon-close"></i>
                                        <i class="iconfont icon-eye"></i>
                                    {{/if}}
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.admin_login_info_bg_images_rand.name}}<span class="am-form-group-label-tips">{{$data.admin_login_info_bg_images_rand.describe}}</span></label>
                        <select name="{{$data.admin_login_info_bg_images_rand.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.admin_login_info_bg_images_rand.error_tips}}" required>
                            {{foreach :MyConst('common_is_text_list') as $v}}
                                <option value="{{$v.id}}" {{if isset($data['admin_login_info_bg_images_rand']['value']) and $data['admin_login_info_bg_images_rand']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
                            {{/foreach}}
                        </select>
                        {{if is_array(MyLang('config.admin_login_info_bg_images_list_tips'))}}
                            <div class="am-tips-card">
                                <p>{{:implode('</p><p>', MyLang('config.admin_login_info_bg_images_list_tips'))}}</p>
                            </div>
                        {{/if}}
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.admin_login_type.name}}<span class="am-form-group-label-tips">{{$data.admin_login_type.describe}}</span></label>
                        <select name="{{$data.admin_login_type.only_tag}}" multiple="multiple" class="am-radius chosen-select" data-placeholder="{{$data.admin_login_type.name}}" data-validation-message="{{$data.admin_login_type.error_tips}}" required>
                            {{foreach :MyConst('common_login_type_list') as $v}}
                                <option value="{{$v.value}}" {{if isset($data['admin_login_type']['value']) and in_array($v['value'], $data['admin_login_type']['value'])}}selected{{/if}}>{{$v.name}}</option>
                            {{/foreach}}
                        </select>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.admin_login_img_verify_state.name}}<span class="am-form-group-label-tips">{{$data.admin_login_img_verify_state.describe}}</span></label>
                        <select name="{{$data.admin_login_img_verify_state.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.admin_login_img_verify_state.error_tips}}" required>
                            {{foreach :MyConst('common_close_open_list') as $v}}
                                <option value="{{$v.value}}" {{if isset($data['admin_login_img_verify_state']['value']) and $data['admin_login_img_verify_state']['value'] eq $v['value']}}selected{{/if}}>{{$v.name}}</option>
                            {{/foreach}}
                        </select>
                    </div>
                </div>

                <!-- 商品 -->
                <div class="item" data-key="goods">
                    <div class="am-form-group">
                        <label>{{$data.common_spec_add_max_number.name}}<span class="am-form-group-label-tips">{{$data.common_spec_add_max_number.describe}}</span></label>
                        <input type="number" name="{{$data.common_spec_add_max_number.only_tag}}" placeholder="{{$data.common_spec_add_max_number.describe}}" data-validation-message="{{$data.common_spec_add_max_number.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_spec_add_max_number.value}}"{{/if}} />
                    </div>
                </div>

                <!-- 地图 -->
                <div class="item" data-key="map">
                    <div class="am-form-group">
                        <label>{{$data.common_map_type.name}}<span class="am-form-group-label-tips">{{$data.common_map_type.describe}}</span><a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '{{:MyLang('config.map_type_tips')}}', trigger: 'hover focus', theme: 'sm'}"></a></label>
                        <select name="{{$data.common_map_type.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_map_type.error_tips}}" required>
                            {{foreach :MyConst('common_map_type_list') as $v}}
                                <option value="{{$v.id}}" {{if isset($data['common_map_type']['value']) and $data['common_map_type']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
                            {{/foreach}}
                        </select>
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_baidu_map_ak.name}}<span class="am-form-group-label-tips">{{$data.common_baidu_map_ak.describe}}</span></label>
                        <input type="text" name="{{$data.common_baidu_map_ak.only_tag}}" placeholder="{{$data.common_baidu_map_ak.describe}}" data-validation-message="{{$data.common_baidu_map_ak.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_baidu_map_ak.value}}"{{/if}} />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_baidu_map_ak_server.name}}<span class="am-form-group-label-tips">{{$data.common_baidu_map_ak_server.describe}}</span></label>
                        <input type="text" name="{{$data.common_baidu_map_ak_server.only_tag}}" placeholder="{{$data.common_baidu_map_ak_server.describe}}" data-validation-message="{{$data.common_baidu_map_ak_server.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_baidu_map_ak_server.value}}"{{/if}} />
                        <div class="am-tips-card">
                            {{:MyLang('config.apply_map_baidu_name')}} {{if !empty($site_store_links) and !empty($site_store_links['baidu_map_course'])}}<a href="{{$site_store_links.baidu_map_course}}" target="_blank" class="am-margin-left-sm">{{:MyLang('view_config_course_name')}} <i class="am-icon-external-link"></i></a>{{/if}}
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label>{{$data.common_amap_map_ak.name}}<span class="am-form-group-label-tips">{{$data.common_amap_map_ak.describe}}</span></label>
                        <input type="text" name="{{$data.common_amap_map_ak.only_tag}}" placeholder="{{$data.common_amap_map_ak.describe}}" data-validation-message="{{$data.common_amap_map_ak.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_amap_map_ak.value}}"{{/if}} />
                        <input type="text" name="{{$data.common_amap_map_safety_ak.only_tag}}" placeholder="{{$data.common_amap_map_safety_ak.describe}}" data-validation-message="{{$data.common_amap_map_safety_ak.error_tips}}" class="am-radius am-margin-top-xs" {{if !empty($data)}}value="{{$data.common_amap_map_safety_ak.value}}"{{/if}} />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_amap_map_ak_server.name}}<span class="am-form-group-label-tips">{{$data.common_amap_map_ak_server.describe}}</span></label>
                        <input type="text" name="{{$data.common_amap_map_ak_server.only_tag}}" placeholder="{{$data.common_amap_map_ak_server.describe}}" data-validation-message="{{$data.common_amap_map_ak_server.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_amap_map_ak_server.value}}"{{/if}} />
                        <div class="am-tips-card">
                            {{:MyLang('config.apply_map_amap_name')}} {{if !empty($site_store_links) and !empty($site_store_links['amap_map_course'])}}<a href="{{$site_store_links.amap_map_course}}" target="_blank" class="am-margin-left-sm">{{:MyLang('view_config_course_name')}} <i class="am-icon-external-link"></i></a>{{/if}}
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label>{{$data.common_tencent_map_ak.name}}<span class="am-form-group-label-tips">{{$data.common_tencent_map_ak.describe}}</span></label>
                        <input type="text" name="{{$data.common_tencent_map_ak.only_tag}}" placeholder="{{$data.common_tencent_map_ak.describe}}" data-validation-message="{{$data.common_tencent_map_ak.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_tencent_map_ak.value}}"{{/if}} />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_tencent_map_ak_server.name}}<span class="am-form-group-label-tips">{{$data.common_tencent_map_ak_server.describe}}</span></label>
                        <input type="text" name="{{$data.common_tencent_map_ak_server.only_tag}}" placeholder="{{$data.common_tencent_map_ak_server.describe}}" data-validation-message="{{$data.common_tencent_map_ak_server.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_tencent_map_ak_server.value}}"{{/if}} />
                        <div class="am-tips-card">
                            {{:MyLang('config.apply_map_tencent_name')}} {{if !empty($site_store_links) and !empty($site_store_links['tencent_map_course'])}}<a href="{{$site_store_links.tencent_map_course}}" target="_blank" class="am-margin-left-sm">{{:MyLang('view_config_course_name')}} <i class="am-icon-external-link"></i></a>{{/if}}
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label>{{$data.common_tianditu_map_ak.name}}<span class="am-form-group-label-tips">{{$data.common_tianditu_map_ak.describe}}</span></label>
                        <input type="text" name="{{$data.common_tianditu_map_ak.only_tag}}" placeholder="{{$data.common_tianditu_map_ak.describe}}" data-validation-message="{{$data.common_tianditu_map_ak.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_tianditu_map_ak.value}}"{{/if}} />
                    </div>
                    <div class="am-form-group">
                        <label>{{$data.common_tianditu_map_ak_server.name}}<span class="am-form-group-label-tips">{{$data.common_tianditu_map_ak_server.describe}}</span></label>
                        <input type="text" name="{{$data.common_tianditu_map_ak_server.only_tag}}" placeholder="{{$data.common_tianditu_map_ak_server.describe}}" data-validation-message="{{$data.common_tianditu_map_ak_server.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_tianditu_map_ak_server.value}}"{{/if}} />
                        <div class="am-tips-card">
                            {{:MyLang('config.apply_map_tianditu_name')}} {{if !empty($site_store_links) and !empty($site_store_links['tianditu_map_course'])}}<a href="{{$site_store_links.tianditu_map_course}}" target="_blank" class="am-margin-left-sm">{{:MyLang('view_config_course_name')}} <i class="am-icon-external-link"></i></a>{{/if}}
                        </div>
                    </div>
                </div>

                <!-- 扩展 -->
                <div class="item" data-key="extend">
                    <div class="am-form-group">
                        <label>{{$data.common_is_https_connect_store.name}}<span class="am-form-group-label-tips">{{$data.common_is_https_connect_store.describe}}</span></label>
                        <select name="{{$data.common_is_https_connect_store.only_tag}}" class="am-radius chosen-select" data-validation-message="{{$data.common_is_https_connect_store.error_tips}}" required>
                            {{foreach :MyConst('common_is_text_list') as $v}}
                                <option value="{{$v.id}}" {{if isset($data['common_is_https_connect_store']['value']) and $data['common_is_https_connect_store']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
                            {{/foreach}}
                        </select>
                    </div>
                </div>

                <!-- 安全 -->
                <div class="item" data-key="safety">
                    <div class="am-form-group">
                        <label>{{$data.common_data_encryption_secret.name}}<span class="am-form-group-label-tips">{{$data.common_data_encryption_secret.describe}}</span></label>
                        <input type="text" name="{{$data.common_data_encryption_secret.only_tag}}" placeholder="{{$data.common_data_encryption_secret.describe}}" data-validation-message="{{$data.common_data_encryption_secret.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_data_encryption_secret.value}}"{{/if}} />
                    </div>

                    <div class="am-form-group">
                        <label>{{$data.common_cookie_domain.name}}<span class="am-form-group-label-tips">{{$data.common_cookie_domain.describe}}</span></label>
                        <input type="text" name="{{$data.common_cookie_domain.only_tag}}" placeholder="{{$data.common_cookie_domain.describe}}" data-validation-message="{{$data.common_cookie_domain.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_cookie_domain.value}}"{{/if}} />
                        {{if is_array(MyLang('config.cookie_domain_list_tips'))}}
                            <div class="am-tips-card">
                                <p>{{:implode('</p><p>', MyLang('config.cookie_domain_list_tips'))}}</p>
                            </div>
                        {{/if}}
                    </div>

                    <div class="am-form-group">
                        <label class="am-block">{{$data.common_token_created_rules.name}}<span class="am-form-group-label-tips">{{$data.common_token_created_rules.describe}}</span></label>
                        <div class="am-checkbox-group">
                            {{foreach $common_token_created_rules_list as $v}}
                                <label class="am-checkbox-inline">
                                    <input type="checkbox" name="{{$data.common_token_created_rules.only_tag}}" value="{{$v.value}}" {{if isset($data['common_token_created_rules']['value']) and in_array($v['value'], $data['common_token_created_rules']['value'])}}checked{{/if}} data-validation-message="{{$data.common_token_created_rules.error_tips}}" data-am-ucheck /> {{$v.name}}
                                </label>
                            {{/foreach}}
                        </div>
                    </div>
                </div>
            </div>
            <div class="am-form-popup-submit">
                <button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText:'{{:MyLang('save_title')}}'}">
                    <i class="am-icon-save"></i>
                    <span>{{:MyLang('save_title')}}</span>
                </button>
            </div>
        </form>
        <!-- form end -->
	</div>
</div>
<!-- right content end  -->

<!-- footer start -->
{{:ModuleInclude('public/footer')}}